#ifndef SEMANTICNODE_H_
#define SEMANTICNODE_H_

#include "../syntax_tree.h"
#include "../lexic_units.h"
#include "../main_container.h"

#include "ValueType.h"
#include <vector>
#include <string>
#include <sstream>
#include <iostream>

#define DEBUG_STRING_RAZMAK "    "

// zakomentirat ako funkcija createSemanticNode treba obradjivat samo genericke nodove
#define ISPIS_DODATNIH_NODOVA 1

// ovo mozda kasnije nece trebat - u buducnosti obrisat
extern MainContainer *compilerData;


class SemanticNode {
private:

protected:
	/** semanticki roditelj */
	SemanticNode* parent;


	std::string flattenNamePeriodAdd(const SyntaxTreeNode& nameNode);
	std::vector<std::string> flattenTemplateIdentifiers(const SyntaxTreeNode &templateUseNode);



	virtual int getNextUniqueID();

public:
	/**
	 * Osnovni konstruktor semantickog noda
	 * @param syntaxNode sintaksni nod na osnovu kojeg se stvara semanticki noda
	 * @param parent semanticki nod roditelj ovom semantickom nodu
	 */
	SemanticNode(SemanticNode* parent);
	virtual ~SemanticNode();


	virtual std::string toDebugString(int tab);
};

#endif /* SEMANTICNODE_H_ */
